﻿using System.Collections.Generic;
using PurchaseSales.Manage.Model.Entities;
using PurchaseSales.Manage.Services;

namespace PurchaseSales.Manage.Repositories
{
    public class AuthRolesRepository : Repository<AuthRoles>, IAuthRolesRepository
    {
        public AuthRoles GetAuthRoleByRoleId(AuthRoles roles)
        {
            return Session.QueryOver<AuthRoles>().Where(x => x.RoleId == roles.RoleId).SingleOrDefault();
        }

        public IList<AuthRoles> GetAllAuthRole()
        {
            return Session.QueryOver<AuthRoles>().List();
        }
    }
}